home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 037a / svgabgi3.zip / TWK256.H < prev    next >
Text File  |  1991-08-29  |  1KB  |  48 lines

  1. /************************************************/
  2. /*                         */
  3. /*        Tweaked 256 BGI driver defines    */
  4. /*        Copyright (c) 1991        */
  5. /*        Jordan Hargraphix Software        */
  6. /*                        */
  7. /************************************************/
  8.  
  9. #include <dos.h>
  10.  
  11. typedef unsigned char DacPalette256[256][3];
  12.  
  13. extern int far _Cdecl Twk256_fdriver[];
  14.  
  15. /* These are the currently supported modes */
  16. #define    TWK320x400x256        0
  17. #define    TWK320x480x256        1
  18. #define    TWK360x480x256        2
  19. #define    TWK376x564x256        3
  20. #define    TWK400x564x256        4
  21. #define    TWK400x600x256        5
  22.  
  23. #ifndef XNOR_PUT
  24. #define XNOR_PUT    5
  25. #define NAND_PUT    6
  26. #define NOR_PUT        7
  27. #endif
  28. #define TRANS_COPY_PUT    8
  29.  
  30. /* Setvgapalette256 sets the entire 256 color palette */
  31. /* PalBuf contains RGB values for all 256 colors      */
  32. /* R,G,B values range from 0 to 63                  */
  33. /* Usage:                          */
  34. /*  DacPalette256 dac256;                  */
  35. /*                              */
  36. /* setvgapalette256(&dac256);                  */
  37. void setvgapalette256(DacPalette256 *PalBuf)
  38. {
  39.   struct REGPACK reg;
  40.  
  41.   reg.r_ax = 0x1012;
  42.   reg.r_bx = 0;
  43.   reg.r_cx = 256;
  44.   reg.r_es = FP_SEG(PalBuf);
  45.   reg.r_dx = FP_OFF(PalBuf);
  46.   intr(0x10,®);
  47. }
  48.